package com.wchat.utils;

import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;
import java.util.Objects;

public class LoginCredential  implements Serializable {
  private static final long serialVersionUID = 1L;

  @JsonProperty("requestToken")
  private String requestToken = null;

  @JsonProperty("autoLoginToken")
  private String autoLoginToken = null;

  public LoginCredential requestToken(String requestToken) {
    this.requestToken = requestToken;
    return this;
  }

   /**
   * 请求使用的token值
   * @return requestToken
  **/
  @ApiModelProperty(value = "app端请求使用的token值")
  public String getRequestToken() {
    return requestToken;
  }

  public void setRequestToken(String requestToken) {
    this.requestToken = requestToken;
  }

  public LoginCredential autoLoginToken(String autoLoginToken) {
    this.autoLoginToken = autoLoginToken;
    return this;
  }

   /**
   * 用于刷新requestToken的token（永久有效，machineId绑定）
   * @return autoLoginToken
  **/
  @ApiModelProperty(value = "用于刷新requestToken的token")
  public String getAutoLoginToken() {
    return autoLoginToken;
  }

  public void setAutoLoginToken(String autoLoginToken) {
    this.autoLoginToken = autoLoginToken;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    LoginCredential loginCredential = (LoginCredential) o;
    return Objects.equals(this.requestToken, loginCredential.requestToken) &&
        Objects.equals(this.autoLoginToken, loginCredential.autoLoginToken);
  }

  @Override
  public int hashCode() {
    return Objects.hash(requestToken, autoLoginToken);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class LoginCredential {\n");
    
    sb.append("    requestToken: ").append(toIndentedString(requestToken)).append("\n");
    sb.append("    autoLoginToken: ").append(toIndentedString(autoLoginToken)).append("\n");
    sb.append("}");
    return sb.toString();
  }

  /**
   * Convert the given object to string with each line indented by 4 spaces
   * (except the first line).
   */
  private String toIndentedString(java.lang.Object o) {
    if (o == null) {
      return "null";
    }
    return o.toString().replace("\n", "\n    ");
  }
}

